home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sounds Terrific 1
/
Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso
/
modules
/
p
/
phantom3.mod
< prev
next >
Wrap
Text File
|
1994-08-04
|
5KB
|
188 lines
Phantom3.Mod, Auto-Msg Update. Color/80 Col./9 Lines! WORKS!
Phantom Lord #38 @21101 [7Fair Lawn, NJ1]
7Saturday3, 7December 773, 71991 1<210:12 pm EST1 >
┌─────────────────────────────────────────────────────────────────────────┐
│ Phantom3.Mod ── 12-07-91 ─── By Phantom Lord ─── WWIV v4.11 v4.12 v4.20 │
│ Description: Working Enhanced AutoMsg │ Experience: Simple Block Read! │
│ Files Affected: MISCCMD.C │ Steps: 3 │
│ ─── GoldSystem Delayed. Still Typing Out. Keep Your Eyes Open ─── │
└─────────────────────────────────────────────────────────────────────────┘
Step 1:
──────
Backup Your Source!!!
------------------------------------------------------------------------
Step 2:
──────
Load MISCCMD.C and delete void read_automessage(),
void write_automessage1() and void write_automessage().
------------------------------------------------------------------------
Step 3:
──────
Block read the following 3 voids where read_automessage(),
write_automessage1(), and write_automessage were.
void read_automessage()
{
int i,i1,i2,i3,f,len,ptrbeg[10],ptrend[10];
char s[81],l[10][81],anon,buf[512];
slrec ss;
sprintf(s,"%sAUTO.MSG",syscfg.gfilesdir);
f=open(s,O_RDWR | O_BINARY);
nl();
anon=status.amsganon;
if (f<1) {
pl("No Auto-Post! Write One!");
} else {
len=read(f,(void *)buf,512);
close(f);
for (i=0; i<10; i++) {
ptrbeg[i]=0;
ptrend[i]=0;
}
i=0;
i1=0;
i2=0;
for(i=0; i<len; i++) {
if (i1) {
if (buf[i]==10) {
ptrbeg[i2]=i+1;
i1=0;
}
} else {
if (buf[i]==13) {
ptrend[i2]=i-1;
if (i2<9) {
for (i3=ptrbeg[i2]; i3<=ptrend[i2]; i3++)
l[i2][i3-ptrbeg[i2]]=buf[i3];
l[i2][ptrend[i2]-ptrbeg[i2]+1]=0;
}
++i2;
i1=1;
}
}
}
ss=syscfg.sl[actsl];
if (anon)
if (ss.ability & ability_read_post_anony) {
sprintf(s,"%s",&(l[0][0]));
} else
strcpy(s,"NoBoDy #xxx");
else
strcpy(s,&(l[0][0]));
nl();
npr("7[3══── 1Auto Post Entered By: 2%s 3──══7]\r\n",s);
nl();
i=1;
while ((ptrend[i]) && (i<9)) {
pl(&(l[i][0]));
++i;
}
}
nl();
}
void write_automessage1()
{
int i,i1,f;
char s[81],l[10][81];
slrec ss;
nl();
pl("3Write Auto-Post1! 29 3Lines1: Ctrl3-1P Colors Work Here3!");
s[0]=0;
nl();
for (i=0; i<9; i++) {
outchr(i+'1');
outchr('>');
inli(&(l[i][0]),s,77,1);
strcat(&(l[i][0]),"\r\n");
}
nl();
ss=syscfg.sl[actsl];
if (ss.ability & ability_post_anony) {
prt(5,"Anonymous!? [Y/N]: ");
if (yn())
i1=anony_sender;
else
i1=0;
} else
i1=0;
prt(5,"Is This Ok? [Y/N]: ");
if (yn()) {
status.amsganon=i1;
status.amsguser=usernum;
save_status();
sprintf(s,"%sAUTO.MSG",syscfg.gfilesdir);
f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
strcpy(s,nam(&thisuser,usernum));
strcat(s,"\r\n");
write(f,(void *)s,strlen(s));
for (i=0; i<9; i++)
write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
sysoplog("-+*+- Changed Auto-Post!");
for (i=0; i<9; i++) {
strcpy(s," ");
l[i][strlen(&(l[i][0]))-2]=0;
strcat(s,&(l[i][0]));
sysoplog(s);
}
nl();
pl("Auto-Post Saved!");
nl();
close(f);
}
}
void write_automessage()
{
char ch;
int done,okwrite;
slrec ss;
ss=syscfg.sl[actsl];
if (ss.posts)
okwrite=1;
else
okwrite=0;
if (thisuser.restrict & restrict_automessage)
okwrite=0;
done=0;
do {
nl();
if (okwrite) {
prt(2,"Auto-Post! [Read/Write/Email/Quit]: ");
ch=onek("QRWE");
} else {
prt(2,"Auto-Post! [Read/Email/Quit]: ");
ch=onek("QRE");
}
switch(ch) {
case 'Q':
done=1;
break;
case 'R':
read_automessage();
break;
case 'W':
write_automessage1();
break;
case 'E':
if (status.amsguser)
email(status.amsguser,0,0,status.amsganon);
break;
}
} while ((!done) && (!hangup));
}
------------------------------------------------------------------------
What'd I Tell Ya... Easy As Hell Aint It? Sorry The GoldSystem Is So
Late, I'm Still Writing Out The 4 Files For It... I'm Trying To Keep
These In Chronological Order So That's Why This Is PHANTOM3 Instead
Of PHANTOM2... If You Need Any Help With This Or Any Other Of My Mods,
Let Me Know, Net-Mail Me.
-Phantom Lord
------------------------------------------------------------------------